import React, { PureComponent } from 'react';
import { Provider } from 'react-redux';
import { BrowserRouter, Route } from 'react-router-dom';
import store from './store/index';
import Header from './common/header/index';
import Home from './page/home';
import Detail from './page/detail/loadable.js';
import Login from './page/login';
import Write from './page/write';

class App extends PureComponent{
	render() {
		return (
			<Provider store={store}>	
					<BrowserRouter>
						<div>
							<Header />
							<Route path='/' exact component={Home}></Route>
							<Route path='/login' exact component={Login}></Route>
							<Route path='/write' exact component={Write}></Route>
							<Route path='/detail/:id' exact component={Detail}></Route>
						</div>
					</BrowserRouter>
			</Provider>
		)
	}
}

export default App;